#import "KingdomUnveilController.h"
        
#import "KingdomUnveilModel.h"
#import "KingdomUnveilCell.h"
#import "Masonry.h"

@interface KingdomUnveilController () <UICollectionViewDataSource, UICollectionViewDelegate>

@property (nonatomic, strong) UICollectionView *curiousVelvetCollectionView;
@property (nonatomic, strong) NSMutableArray *stillnessDataSource;

@end

@implementation KingdomUnveilController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self charismaUniverseApprehensionSetuplayout];
	[self mandalaJoyousBravefetchData];
}


//: 获取数据模型
- (void)mandalaJoyousBravefetchData {
	
}

- (void)charismaUniverseApprehensionSetuplayout {
    UICollectionViewFlowLayout *oasis = [[UICollectionViewFlowLayout alloc] init];
    oasis.minimumLineSpacing = 10;
    oasis.minimumInteritemSpacing = 10;
    oasis.itemSize = CGSizeMake(100, 100);
    oasis.scrollDirection = UICollectionViewScrollDirectionVertical;
    
    self.curiousVelvetCollectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:oasis];
    self.curiousVelvetCollectionView.backgroundColor = UIColor.clearColor;
    self.curiousVelvetCollectionView.delegate = self;
    self.curiousVelvetCollectionView.dataSource = self;
    self.curiousVelvetCollectionView.showsHorizontalScrollIndicator = NO;
    self.curiousVelvetCollectionView.showsVerticalScrollIndicator = NO;
    [self.curiousVelvetCollectionView registerClass:[KingdomUnveilCell class] forCellWithReuseIdentifier:NSStringFromClass([KingdomUnveilCell class])];
    
    [self.view addSubview:self.curiousVelvetCollectionView];
    [self.curiousVelvetCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.view);
    }];
}

//: 懒加载数据模型数组
- (NSMutableArray *)stillnessDataSource {
	if (!_stillnessDataSource) {
		_stillnessDataSource = [NSMutableArray array];
	}
	return _stillnessDataSource;
}

#pragma mark - UICollectionView DataSource
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
    return self.stillnessDataSource.count;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    KingdomUnveilCell *tranquilGlisten = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([KingdomUnveilCell class]) forIndexPath:indexPath];
    return tranquilGlisten;
}

#pragma mark - UICollectionView Delegate
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
    //: collectioncell 点击
}


@end
